/*  1:   */ package com.atomikos.icatch.imp;
/*  2:   */ 
/*  3:   */ import com.atomikos.icatch.CompositeTransaction;
/*  4:   */ import com.atomikos.icatch.Participant;
/*  5:   */ import com.atomikos.icatch.RecoveryCoordinator;
/*  6:   */ import com.atomikos.icatch.RollbackException;
/*  7:   */ import com.atomikos.icatch.SysException;
/*  8:   */ import com.atomikos.icatch.TxState;
/*  9:   */ 
/* 10:   */ class TxRollbackOnlyStateHandler
/* 11:   */   extends TransactionStateHandler
/* 12:   */ {
/* 13:   */   protected TxRollbackOnlyStateHandler(CompositeTransactionImp ct, TransactionStateHandler handler)
/* 14:   */   {
/* 15:46 */     super(ct, handler);
/* 16:   */   }
/* 17:   */   
/* 18:   */   protected RecoveryCoordinator addParticipant(Participant participant)
/* 19:   */     throws SysException, IllegalStateException
/* 20:   */   {
/* 21:   */     try
/* 22:   */     {
/* 23:56 */       participant.rollback();
/* 24:   */     }
/* 25:   */     catch (Exception ignore) {}
/* 26:60 */     return getCT().getCoordinatorImp();
/* 27:   */   }
/* 28:   */   
/* 29:   */   protected CompositeTransaction createSubTransaction()
/* 30:   */     throws SysException, IllegalStateException
/* 31:   */   {
/* 32:68 */     throw new IllegalStateException("Transaction is marked for rollback");
/* 33:   */   }
/* 34:   */   
/* 35:   */   protected void commit()
/* 36:   */     throws SysException, IllegalStateException, RollbackException
/* 37:   */   {
/* 38:83 */     rollbackWithStateCheck();
/* 39:84 */     throw new RollbackException("Transaction set to rollback only");
/* 40:   */   }
/* 41:   */   
/* 42:   */   protected Object getState()
/* 43:   */   {
/* 44:89 */     return TxState.MARKED_ABORT;
/* 45:   */   }
/* 46:   */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions\3.7.0\transactions-3.7.0.jar
 * Qualified Name:     com.atomikos.icatch.imp.TxRollbackOnlyStateHandler
 * JD-Core Version:    0.7.0.1
 */